package com.lcs.springcloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.concurrent.TimeUnit;

@RestController
@RequestMapping("/stock")
public class StockController {

    @Value("${server.port}")
    private String PORT;
    @GetMapping("/reduct")
    public String reduct() throws Exception
    {
        int n = 10/0;
        System.out.println("扣除库存成功");
        return "扣除库存成功:"+PORT;
    }
}
